angular.module('checkLoginModule',[])
    .factory('checkLoginFactory',['$rootScope','$location',function($rootScope,$location){
        var login={};
        login.checkLogin=function(){
            var user=LsyCookie.getItem('userLogin');
            if(user){
                $rootScope.loginUser=user;
            }else {
                $location.path('login');
            }
        };
        return login;
    }]);
